3.272 \(\int \frac{(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+b \cos (c+d x))^3} \, dx\)

Optimal. Leaf size=402 \[ -\frac{b^2 \left (-29 a^2 A b^3+20 a^4 A b+15 a^3 b^2 B-12 a^5 B-6 a b^4 B+12 A b^5\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^5 d (a-b)^{5/2} (a+b)^{5/2}}-\frac{\left (-21 a^2 A b^3+6 a^4 A b+11 a^3 b^2 B-2 a^5 B-6 a b^4 B+12 A b^5\right ) \tan (c+d x)}{2 a^4 d \left (a^2-b^2\right )^2}+\frac{\left (a^2 A-6 a b B+12 A b^2\right ) \tanh ^{-1}(\sin (c+d x))}{2 a^5 d}+\frac{\left (-10 a^2 A b^2+a^4 A+6 a^3 b B-3 a b^3 B+6 A b^4\right ) \tan (c+d x) \sec (c+d x)}{2 a^3 d \left (a^2-b^2\right )^2}+\frac{b \left (7 a^2 A b-5 a^3 B+2 a b^2 B-4 A b^3\right ) \tan (c+d x) \sec (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))}+\frac{b (A b-a B) \tan (c+d x) \sec (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2} \]

[Out]

-((b^2*(20*a^4*A*b - 29*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 15*a^3*b^2*B - 6*a*b^4*B)*ArcTan[(Sqrt[a - b]*Tan[(c
 + d*x)/2])/Sqrt[a + b]])/(a^5*(a - b)^(5/2)*(a + b)^(5/2)*d)) + ((a^2*A + 12*A*b^2 - 6*a*b*B)*ArcTanh[Sin[c +
 d*x]])/(2*a^5*d) - ((6*a^4*A*b - 21*a^2*A*b^3 + 12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B)*Tan[c + d*x])/
(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B)*Sec[c + d*x]*Tan[c + d*x])
/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2
) + (b*(7*a^2*A*b - 4*A*b^3 - 5*a^3*B + 2*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Co
s[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 2.23645, antiderivative size = 402, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {3000, 3055, 3001, 3770, 2659, 205} \[ -\frac{b^2 \left (-29 a^2 A b^3+20 a^4 A b+15 a^3 b^2 B-12 a^5 B-6 a b^4 B+12 A b^5\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^5 d (a-b)^{5/2} (a+b)^{5/2}}-\frac{\left (-21 a^2 A b^3+6 a^4 A b+11 a^3 b^2 B-2 a^5 B-6 a b^4 B+12 A b^5\right ) \tan (c+d x)}{2 a^4 d \left (a^2-b^2\right )^2}+\frac{\left (a^2 A-6 a b B+12 A b^2\right ) \tanh ^{-1}(\sin (c+d x))}{2 a^5 d}+\frac{\left (-10 a^2 A b^2+a^4 A+6 a^3 b B-3 a b^3 B+6 A b^4\right ) \tan (c+d x) \sec (c+d x)}{2 a^3 d \left (a^2-b^2\right )^2}+\frac{b \left (7 a^2 A b-5 a^3 B+2 a b^2 B-4 A b^3\right ) \tan (c+d x) \sec (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))}+\frac{b (A b-a B) \tan (c+d x) \sec (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*Cos[c + d*x])*Sec[c + d*x]^3)/(a + b*Cos[c + d*x])^3,x]

[Out]

-((b^2*(20*a^4*A*b - 29*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 15*a^3*b^2*B - 6*a*b^4*B)*ArcTan[(Sqrt[a - b]*Tan[(c
 + d*x)/2])/Sqrt[a + b]])/(a^5*(a - b)^(5/2)*(a + b)^(5/2)*d)) + ((a^2*A + 12*A*b^2 - 6*a*b*B)*ArcTanh[Sin[c +
 d*x]])/(2*a^5*d) - ((6*a^4*A*b - 21*a^2*A*b^3 + 12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B)*Tan[c + d*x])/
(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B)*Sec[c + d*x]*Tan[c + d*x])
/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2
) + (b*(7*a^2*A*b - 4*A*b^3 - 5*a^3*B + 2*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Co
s[c + d*x]))

Rule 3000

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[((A*b^2 - a*b*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*
Sin[e + f*x])^(1 + n))/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2)), x] + Dist[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int
[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[(a*A - b*B)*(b*c - a*d)*(m + 1) + b*d*(A*b - a*B)*(m
 + n + 2) + (A*b - a*B)*(a*d*(m + 1) - b*c*(m + 2))*Sin[e + f*x] - b*d*(A*b - a*B)*(m + n + 3)*Sin[e + f*x]^2,
 x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^
2, 0] && RationalQ[m] && m < -1 && ((EqQ[a, 0] && IntegerQ[m] &&  !IntegerQ[n]) ||  !(IntegerQ[2*n] && LtQ[n,
-1] && ((IntegerQ[n] &&  !IntegerQ[m]) || EqQ[a, 0])))

Rule 3055

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e +
 f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2)), x] + Dis
t[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[(m + 1)*(b
*c - a*d)*(a*A - b*B + a*C) + d*(A*b^2 - a*b*B + a^2*C)*(m + n + 2) - (c*(A*b^2 - a*b*B + a^2*C) + (m + 1)*(b*
c - a*d)*(A*b - a*B + b*C))*Sin[e + f*x] - d*(A*b^2 - a*b*B + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && Lt
Q[m, -1] && ((EqQ[a, 0] && IntegerQ[m] &&  !IntegerQ[n]) ||  !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] &&
  !IntegerQ[m]) || EqQ[a, 0])))

Rule 3001

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
 && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{(A+B \cos (c+d x)) \sec ^3(c+d x)}{(a+b \cos (c+d x))^3} \, dx &=\frac{b (A b-a B) \sec (c+d x) \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{\int \frac{\left (2 \left (a^2 A-2 A b^2+a b B\right )-2 a (A b-a B) \cos (c+d x)+3 b (A b-a B) \cos ^2(c+d x)\right ) \sec ^3(c+d x)}{(a+b \cos (c+d x))^2} \, dx}{2 a \left (a^2-b^2\right )}\\ &=\frac{b (A b-a B) \sec (c+d x) \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{b \left (7 a^2 A b-4 A b^3-5 a^3 B+2 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac{\int \frac{\left (2 \left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right )-a \left (4 a^2 A b-A b^3-2 a^3 B-a b^2 B\right ) \cos (c+d x)+2 b \left (7 a^2 A b-4 A b^3-5 a^3 B+2 a b^2 B\right ) \cos ^2(c+d x)\right ) \sec ^3(c+d x)}{a+b \cos (c+d x)} \, dx}{2 a^2 \left (a^2-b^2\right )^2}\\ &=\frac{\left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b (A b-a B) \sec (c+d x) \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{b \left (7 a^2 A b-4 A b^3-5 a^3 B+2 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac{\int \frac{\left (-2 \left (6 a^4 A b-21 a^2 A b^3+12 A b^5-2 a^5 B+11 a^3 b^2 B-6 a b^4 B\right )+2 a \left (a^4 A+4 a^2 A b^2-2 A b^4-4 a^3 b B+a b^3 B\right ) \cos (c+d x)+2 b \left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right ) \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx}{4 a^3 \left (a^2-b^2\right )^2}\\ &=-\frac{\left (6 a^4 A b-21 a^2 A b^3+12 A b^5-2 a^5 B+11 a^3 b^2 B-6 a b^4 B\right ) \tan (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b (A b-a B) \sec (c+d x) \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{b \left (7 a^2 A b-4 A b^3-5 a^3 B+2 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac{\int \frac{\left (2 \left (a^2-b^2\right )^2 \left (a^2 A+12 A b^2-6 a b B\right )+2 a b \left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right ) \cos (c+d x)\right ) \sec (c+d x)}{a+b \cos (c+d x)} \, dx}{4 a^4 \left (a^2-b^2\right )^2}\\ &=-\frac{\left (6 a^4 A b-21 a^2 A b^3+12 A b^5-2 a^5 B+11 a^3 b^2 B-6 a b^4 B\right ) \tan (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b (A b-a B) \sec (c+d x) \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{b \left (7 a^2 A b-4 A b^3-5 a^3 B+2 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac{\left (a^2 A+12 A b^2-6 a b B\right ) \int \sec (c+d x) \, dx}{2 a^5}-\frac{\left (b^2 \left (20 a^4 A b-29 a^2 A b^3+12 A b^5-12 a^5 B+15 a^3 b^2 B-6 a b^4 B\right )\right ) \int \frac{1}{a+b \cos (c+d x)} \, dx}{2 a^5 \left (a^2-b^2\right )^2}\\ &=\frac{\left (a^2 A+12 A b^2-6 a b B\right ) \tanh ^{-1}(\sin (c+d x))}{2 a^5 d}-\frac{\left (6 a^4 A b-21 a^2 A b^3+12 A b^5-2 a^5 B+11 a^3 b^2 B-6 a b^4 B\right ) \tan (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b (A b-a B) \sec (c+d x) \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{b \left (7 a^2 A b-4 A b^3-5 a^3 B+2 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}-\frac{\left (b^2 \left (20 a^4 A b-29 a^2 A b^3+12 A b^5-12 a^5 B+15 a^3 b^2 B-6 a b^4 B\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^5 \left (a^2-b^2\right )^2 d}\\ &=-\frac{b^2 \left (20 a^4 A b-29 a^2 A b^3+12 A b^5-12 a^5 B+15 a^3 b^2 B-6 a b^4 B\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^5 (a-b)^{5/2} (a+b)^{5/2} d}+\frac{\left (a^2 A+12 A b^2-6 a b B\right ) \tanh ^{-1}(\sin (c+d x))}{2 a^5 d}-\frac{\left (6 a^4 A b-21 a^2 A b^3+12 A b^5-2 a^5 B+11 a^3 b^2 B-6 a b^4 B\right ) \tan (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4 A-10 a^2 A b^2+6 A b^4+6 a^3 b B-3 a b^3 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b (A b-a B) \sec (c+d x) \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{b \left (7 a^2 A b-4 A b^3-5 a^3 B+2 a b^2 B\right ) \sec (c+d x) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}\\ \end{align*}

Mathematica [A]  time = 2.70888, size = 507, normalized size = 1.26 \[ \frac{\frac{16 b^2 \left (-29 a^2 A b^3+20 a^4 A b+15 a^3 b^2 B-12 a^5 B-6 a b^4 B+12 A b^5\right ) \tanh ^{-1}\left (\frac{(a-b) \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{b^2-a^2}}\right )}{\left (b^2-a^2\right )^{5/2}}-8 \left (a^2 A-6 a b B+12 A b^2\right ) \log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )+8 \left (a^2 A-6 a b B+12 A b^2\right ) \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )+\frac{2 a \tan (c+d x) \sec (c+d x) \left (2 a b \left (32 a^2 A b^3-11 a^4 A b-16 a^3 b^2 B+4 a^5 B+9 a b^4 B-18 A b^5\right ) \cos (2 (c+d x))+\left (14 a^4 A b^3+47 a^2 A b^5-16 a^6 A b-10 a^5 b^2 B-25 a^3 b^4 B+8 a^7 B+18 a b^6 B-36 A b^7\right ) \cos (c+d x)-6 a^4 A b^3 \cos (3 (c+d x))+21 a^2 A b^5 \cos (3 (c+d x))-30 a^5 A b^2+68 a^3 A b^4+4 a^7 A+2 a^5 b^2 B \cos (3 (c+d x))-11 a^3 b^4 B \cos (3 (c+d x))-32 a^4 b^3 B+18 a^2 b^5 B+8 a^6 b B-36 a A b^6+6 a b^6 B \cos (3 (c+d x))-12 A b^7 \cos (3 (c+d x))\right )}{\left (a^2-b^2\right )^2 (a+b \cos (c+d x))^2}}{16 a^5 d} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*Cos[c + d*x])*Sec[c + d*x]^3)/(a + b*Cos[c + d*x])^3,x]

[Out]

((16*b^2*(20*a^4*A*b - 29*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 15*a^3*b^2*B - 6*a*b^4*B)*ArcTanh[((a - b)*Tan[(c
+ d*x)/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(5/2) - 8*(a^2*A + 12*A*b^2 - 6*a*b*B)*Log[Cos[(c + d*x)/2] - Sin[(
c + d*x)/2]] + 8*(a^2*A + 12*A*b^2 - 6*a*b*B)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + (2*a*(4*a^7*A - 30*a^
5*A*b^2 + 68*a^3*A*b^4 - 36*a*A*b^6 + 8*a^6*b*B - 32*a^4*b^3*B + 18*a^2*b^5*B + (-16*a^6*A*b + 14*a^4*A*b^3 +
47*a^2*A*b^5 - 36*A*b^7 + 8*a^7*B - 10*a^5*b^2*B - 25*a^3*b^4*B + 18*a*b^6*B)*Cos[c + d*x] + 2*a*b*(-11*a^4*A*
b + 32*a^2*A*b^3 - 18*A*b^5 + 4*a^5*B - 16*a^3*b^2*B + 9*a*b^4*B)*Cos[2*(c + d*x)] - 6*a^4*A*b^3*Cos[3*(c + d*
x)] + 21*a^2*A*b^5*Cos[3*(c + d*x)] - 12*A*b^7*Cos[3*(c + d*x)] + 2*a^5*b^2*B*Cos[3*(c + d*x)] - 11*a^3*b^4*B*
Cos[3*(c + d*x)] + 6*a*b^6*B*Cos[3*(c + d*x)])*Sec[c + d*x]*Tan[c + d*x])/((a^2 - b^2)^2*(a + b*Cos[c + d*x])^
2))/(16*a^5*d)

________________________________________________________________________________________

Maple [B]  time = 0.206, size = 1551, normalized size = 3.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*cos(d*x+c))*sec(d*x+c)^3/(a+b*cos(d*x+c))^3,x)

[Out]

1/2/d*A/a^3/(tan(1/2*d*x+1/2*c)-1)^2-1/d/a^3/(tan(1/2*d*x+1/2*c)-1)*B-1/2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ln(tan(1/2*d*x+1/2*c)+1)*B*b+3/d/a^4/(tan(1/2*d*x+1/2*c)-1)*A*b-6/d/a^5*ln(tan(1/2*d*x+1/2*c)-1)*A*b^2+3/d/
a^4*ln(tan(1/2*d*x+1/2*c)-1)*B*b+3/d/a^4/(tan(1/2*d*x+1/2*c)+1)*A*b+6/d/a^5*ln(tan(1/2*d*x+1/2*c)+1)*A*b^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)^3/(a+b*cos(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)^3/(a+b*cos(d*x+c))^3,x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)**3/(a+b*cos(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.60215, size = 1883, normalized size = 4.68 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)^3/(a+b*cos(d*x+c))^3,x, algorithm="giac")

[Out]

-1/2*(2*(12*B*a^5*b^2 - 20*A*a^4*b^3 - 15*B*a^3*b^4 + 29*A*a^2*b^5 + 6*B*a*b^6 - 12*A*b^7)*(pi*floor(1/2*(d*x
+ c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c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1/2*c))/((a^8 - 2*a^6*b
^2 + a^4*b^4)*(a*tan(1/2*d*x + 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 + 2*b*tan(1/2*d*x + 1/2*c)^2 - a - b)^2) -
(A*a^2 - 6*B*a*b + 12*A*b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^5 + (A*a^2 - 6*B*a*b + 12*A*b^2)*log(abs(tan
(1/2*d*x + 1/2*c) - 1))/a^5)/d